﻿<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/common/taglibs.jsp" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>完善项目信息</title>
    <!--common-->
    <link href="/resources/src/css/estp.css" rel="stylesheet">
</head>
<body>
    
    <header class="estp_header">
    	<div class="logo"><img src="/resources/src/images/vchello_saas_logo.png" alt=""></div>
    	<div class="menu-nav clearfix">
    		<a href="javascript:;">浏览记录</a>
    		<a href="javascript:;">投递记录</a>
    	</div>
    	<ul class="menu-right">
    		<li><a href="javascript:;"><i class="iconfont icon-user"></i> Soure</a></li>
    	</ul>
    </header>
    <span>你将投递项目给${userPro.userName }<input type="hidden" id="deliveryId" value="${userPro.id }"/></span>
    <div class="main_content">
    	<div class="top_bar">
    		<a href="javascript:;" class="active">基本资料</a>
    		<a href="javascript:;">团队信息</a>
    		<a href="javascript:;">项目重要历程</a>
    	</div>
    	<div class="content_bd">
    		<div class="tab_panel">
    			<div class="first_1 content bg-white">
    				<form id="memberform">
	    				<div class="item clearfix" style="padding-bottom: 30px;">
	    					<input type="hidden" id="proDeliveryId" value="${proDelivery.id }"/>
							<div class="item-label pull-left">项目Logo：</div>
							<div class="project-logo pull-left">
								<img src="${proDelivery.logo != '' ? proDelivery.logo : '/resources/src/images/project-logo.png' }" width="160" height="160" id="logoButton"/>
								<input type="hidden" id="logoValue" value="" />
							</div>
							<div class="tips" style="margin-left: 100px;">注：logo宽高比建议1:1</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="project_name">项目名称：</label></div>
			 				<div class="pull-left">
								<input type="text" id="project_name" name="project_name" placeholder="请输入项目名" value="${proDelivery.name }"/>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="business">项目行业：</label></div>
							<div class="select pull-left">
								<input type="text" id="business" name="business" data-val="${proDelivery.fields}" readonly="readonly" placeholder="请选择行业" /><i class="iconfont icon-control-arr-copy-copy"></i>
								<div class="options-box">
									<c:forEach items="${fieldList }" var="field">
										<span class="options" data-id="${field.id }">${field.fieldName }<i class="pull-right iconfont icon-gou"></i></span>
									</c:forEach>
								</div>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="round">当前轮次：</label></div>
							<div class="select pull-left">
								<input type="text" id="round" name="round" data-val="${proDelivery.round}" readonly="readonly" placeholder="请选择轮次"/><i class="iconfont icon-control-arr-copy-copy"></i>
								<div class="options-box">
									<c:forEach items="${roundList }" var="round">
										<span class="options" data-id="${round.id }">${round.name }<i class="pull-right iconfont icon-gou"></i></span>
									</c:forEach>
								</div>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="city">所在地区：</label></div>
							<div class="select pull-left">
								<input type="text" id="city" name="city" data-val="${proDelivery.area}" readonly="readonly" placeholder="请选择城市"/>
								<i class="iconfont icon-control-arr-copy-copy"></i>
								<div class="options-box">
									<c:forEach items="${areaLsit }" var="area">
										<span class="options" data-id="${area.id }">${area.name }<i class="pull-right iconfont icon-gou"></i></span>
									</c:forEach>
								</div>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label notRequired pull-left"><label class="lab" for="link">产品链接：</label></div>
							<div class="pull-left"><input type="text" id="link" name="link" placeholder="请输入产品链接地址" value="${proDelivery.link }"/></div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="book">上传 B P：</label></div>
							<div class="upload pull-left">
								<span class="uploadBP_btn" id="BpButton" src="${proDelivery.bp }"><font>上传文件</font></span>
							</div>
							${proDelivery.bp }
							<div class="pmgressbar-box pull-left">
								<!-- <div class="pmgressbar"><span></span></div>
								<div class="pmgressbar-cancel"><i class="iconfont icon-shanchu"></i></div> -->
								<div class="pmgressbar" id="bpProgressBar"><span></span></div>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="equity">出让股权：</label></div>
							<div class="pull-left"><input type="text" name="equity" id="equity" placeholder="请输入出让股权" value="${proDelivery.stock }"/></div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="money">融资金额：</label></div>
							<div class="pull-left">
								<div class="pull-left" style="margin-right:20px; position:relative;">
									<input type="text" id="money" name="money" placeholder="请输入金额" value="${proDelivery.money }"/><span class="wan text-center">万</span>
								</div>
								<div class="select pull-left">
									<input type="text" id="currency" name="currency" readonly="readonly" data-val="${proDelivery.unit}" placeholder="请选择币种" style="width:200px;"/>
									<i class="iconfont icon-control-arr-copy-copy"></i>
									<div class="options-box">
										<span class="options" data-id='1'>人民币<i class="pull-right iconfont icon-gou"></i></span>
										<span class="options" data-id='2'>美元<i class="pull-right iconfont icon-gou"></i></span>
									</div>
								</div>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label notRequired pull-left">亮点标签：</div>
							<div class="pull-left">
								<div class="tags text-left">
									<input type="text" id="tag" name="tag" placeholder="请填写标签" value="${proDelivery.lables}" />
								</div>
								<i class="iconfont icon-wenti" title="可从团队成员经历、项目目前业绩等方面描述。"></i>
							</div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="contact_name">联系人姓名：</label></div>
							<div class="pull-left"><input type="text" name="contact_name" id="contact_name" placeholder="请输入联系人姓名" value="${proDelivery.contactsName }"/></div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="contact_phone">联系人电话：</label></div>
							<div class="pull-left"><input type="text" name="contact_phone" id="contact_phone" placeholder="请输入联系人手机" value="${proDelivery.contactsPhone }"/></div>
						</div>
						<div class="item clearfix">
							<div class="item-label pull-left"><label class="lab" for="project_comment">项目简介：</label></div>
							<div class="pull-left">
								<div class="txt">
									<p class="txt-tip text-right">0/500</p>
									<textarea id="project_comment" name="project_comment" maxlength="500" placeholder="请输入项目简介">${proDelivery.proDetail }</textarea>
								</div>
							</div>
						</div>					
						<div class="item clearfix">
							<input type="submit" class="next_btn pull-right" value="下一步">
	    					<!-- <div class="next_btn pull-right first_next" id="save">下一步</div> -->
	    				</div>
	    			</form>
    			</div>
    		</div>
    		<div class="tab_panel">
    			<div class="team_list">
    				<!-- <div class="team_row">
    					<div class="show_mow">
	    					<div class="top_line clearfix">
	    						<div class="person">
	    							<span>高端表</span>
	    							<b>CEO</b>
	    						</div>
	    						<div class="tel">
	    							<span>联系电话：</span>
	    							<b>13423003675</b>
	    						</div>
	    						<div class="teamBtn">
		                            <i class="iconfont icon-bianji1 edit_person" icontip="编辑"></i>
		                            <i class="iconfont icon-shanchu2" icontip="删除"></i>
		                        </div>
	    					</div>
	    					<p class="team_txt">属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工属地管理手机卡数控加工</p>
    					</div>
    					<div class="edit_mow">
    						<div class="input_line">
    							<div class="pull-left">
	    							<input type="text" placeholder="姓名" name="name">    							
	    							<input type="text" placeholder="职位" name="job">
	    							<input type="text" placeholder="手机号码" name="tel">
    							</div>
    							<div class="pull-right">
	    							<i class="iconfont icon-msnui-save-bold save_person" icontip="保存"></i>
    							</div>
    						</div>
    						<div class="edit_moreTxt">
    							<textarea placeholder="包括教育经历、工作经验、创业经历、行业背景等内容" name="intro"></textarea>
    						</div>    						
    					</div>
    				</div> -->
    				<c:forEach items="${proDelivery.proDeliveryOrganizationList }" var="organization">
    				<div class="team_row">
    					<div class="show_mow">
	    					<div class="top_line clearfix">
	    						<div class="person" data-id="${organization.id }" data-name="${organization.proId }">	    							
	    							<span>${organization.name }</span>
	    							<b>${organization.position }</b>
	    						</div>
	    						<div class="tel">
	    							<span>联系电话：</span>
	    							<b>${organization.phone }</b>
	    						</div>
	    						<div class="teamBtn">
		                            <i class="iconfont icon-bianji1 edit_person" icontip="编辑"></i>
		                            <i class="iconfont icon-shanchu2" icontip="删除" onclick="delOrganization(${organization.id })"></i>
		                        </div>
	    					</div>
	    					<p class="team_txt">${organization.detail }</p>
    					</div>
    					<div class="edit_mow">
    						<div class="input_line">
    							<div class="pull-left">
	    							<input type="text" placeholder="姓名" name="name">    							
	    							<input type="text" placeholder="职位" name="job">
	    							<input type="text" placeholder="手机号码" name="tel">
    							</div>
    							<div class="pull-right">
	    							<i class="iconfont icon-msnui-save-bold save_person" icontip="保存"></i>
    							</div>
    						</div>
    						<div class="edit_moreTxt">
    							<textarea placeholder="包括教育经历、工作经验、创业经历、行业背景等内容" name="intro"></textarea>
    						</div>    						
    					</div>
    				</div>
    				</c:forEach>
    			</div>
    			<div class="add_mow">
    				<div class="input_line">
    					<div class="pull-left">
	    					<input type="text" placeholder="姓名" name="name">    							
	    					<input type="text" placeholder="职位" name="job">
	    					<input type="text" placeholder="手机号码" name="tel">
    					</div>
    					<div class="pull-right">
	    					<i class="iconfont icon-msnui-save-bold add_save_person" icontip="保存"></i>
    					</div>
    				</div>
    				<div class="edit_moreTxt">
    					<textarea placeholder="包括教育经历、工作经验、创业经历、行业背景等内容" name="intro"></textarea>
    				</div>    						
    			</div>
    			<div class="add_person">
    				<i class="iconfont icon-tianjia1"></i> <span>添加核心成员</span>
    			</div>
    			<div class="clearfix">    				
    				<div class="next_btn pull-left two_prev" style="margin-top: 30px;">上一步</div>
    				<div class="next_btn pull-right two_next" style="margin-top: 30px;">下一步</div>
    			</div>
    		</div>
    		<div class="tab_panel">
    			<div class="course_list">
    				<c:forEach items="${proDelivery.proDeliveryMilepostList }" var="milepost">
	    			 <div class="course_row">
	    				<div class="show_mow">
		    				<div class="top_line clearfix">
		    					<div class="time" data-id="${milepost.id }" data-name="${milepost.proId }">
		    						<i class="iconfont icon-rili"></i>
		    						<span>${milepost.createTime }</span>
		    					</div>	    						
		    					<div class="courseBtn">
			                        <i class="iconfont icon-bianji1 edit_course" icontip="编辑"></i>
			                        <i class="iconfont icon-shanchu2" icontip="删除" onclick="delMilepost(${milepost.id })"></i>
			                    </div>
		    				</div>
		    				<p class="course_txt">${milepost.detail }</p>
	    				</div>
	    				<div class="edit_mow">
	    					<div class="input_line">
	    						<div class="pull-left">
	    							<div class="time_input">
			    						<input type="text" placeholder="日期" name="time" readonly>
			    						<i class="iconfont icon-rili" icontip="日期"></i>
		    						</div>
	    						</div>
	    						<div class="pull-right">
		    						<i class="iconfont icon-msnui-save-bold save_course" icontip="保存"></i>
	    						</div>
	    					</div>
	    					<div class="edit_moreTxt">
	    						<textarea placeholder="项目历程介绍" name="intro"></textarea>
	    					</div>    						
	    				</div>
	    				</div>
	    				</c:forEach> 
	    		</div>
	    		<div class="add_mow">
    				<div class="input_line">
	    				<div class="pull-left">
	    					<div class="time_input">
			    				<input type="text" placeholder="日期" name="time" readonly>
			    				<i class="iconfont icon-rili" icontip="日期"></i>
		    				</div>
	    				</div>
	    				<div class="pull-right">
		    				<i class="iconfont icon-msnui-save-bold add_save_course" icontip="保存"></i>
	    				</div>
	    			</div>
	    			<div class="edit_moreTxt">
	    				<textarea placeholder="项目历程介绍" name="intro"></textarea>
	    			</div>     						
    			</div>
    			<div class="add_course">
    				<i class="iconfont icon-tianjia1"></i> <span>添加重要历程</span>
    			</div>
    			<div class="clearfix">
    				<div class="next_btn pull-left three_prev" style="margin-top: 30px;">上一步</div>    				
    				<div class="next_btn pull-right" style="margin-top: 30px;" id="deliver_pro">投递项目</div>
    			</div>
    		</div>
    	</div>
    </div>

    <script src="/resources/src/js//jquery-1.9.1.min.js"></script>
    <script src="/resources/src/js/jquery.validate.min.js"></script>
    <script src="/resources/src/js/messages_zh.js"></script>
	<script src="/resources/src/js/moment.min.js"></script>
	<script src="/resources/src/js/daterangepicker.js"></script>
	<jsp:include page="/common/plupload/pluploadInclude.jsp"></jsp:include>
	<script src="/resources/src/js/estp.js"></script>   
	<script type="text/javascript">
	$(function(){
		uploadLogo();
		uploadBP();
		evaluate($('#business'));
		evaluate($('#round'));
		evaluate($('#city'));
		evaluate($('#currency'));
		evaluate_label($('#tag').val());
	})
	function uploadLogo(){
	    	/********上传头像********/
	    	var clickId = "logoButton"; //上传按钮id
	    	var fileName = "imageFile"; //文件对应服务器名字
	    	var url = '/uploadFile/img';
	    	var maxFileSize = '5mb'; //文件最大尺寸
	    	var FileType = 'jpg,gif,png,jpeg'; //文件类型
	    	var progressBar = ''; //文件上传进度条
	    	var successType = 'img'; //文件处理类型判断，主要用于区分裁剪功能
	    	var showImgDiv = '#logoButton' //文件上传后，显示在哪个DIV
	    	uploadFile(fileName, url, clickId, maxFileSize, FileType, progressBar, successType, showImgDiv); //上传图片
	}		   
	function uploadBP(){
	    	/********上传头像********/
	    	var clickId = "BpButton"; //上传按钮id
	    	var fileName = "bpFile"; //文件对应服务器名字
	    	var url = '/uploadFile/bp';
	    	var maxFileSize = '5mb'; //文件最大尺寸
	    	var FileType = 'ppt,pptx,doc,docx,pdf'; //文件类型
	    	var progressBar = '#bpProgressBar'; //文件上传进度条
	    	var successType = 'BPFile'; //文件处理类型判断，主要用于区分裁剪功能
	    	var showImgDiv = '#BpButton' //文件上传后，显示在哪个DIV
	    	uploadFile(fileName, url, clickId, maxFileSize, FileType, progressBar, successType, showImgDiv); //上传图片
	}
	function evaluate(obj){
		var id  = obj.attr('data-val');
		var option_list  = obj.siblings('.options-box');
		if(id != '' || id != null || id != 'undefine'){
			$(option_list).find('span').each(function(){
				var _opid = $(this).data('id');
				if(id == _opid){
					$(this).addClass('selected');
					obj.val($(this).text());
				}
			});
		}
	}
	function evaluate_label(val){
		if(val != '' || val != null || val != 'undefine'){
			val=val.substring(0,val.length-1);
			var val_split = val.split(';');
			$.each(val_split,function(i){
				var $span=$("<span></span>"),
					str=val_split[i] + "<i class='del iconfont icon-shanchu'></i>";					
				$span.html(str);
				$("#tag").before($span);
				$(".tags").removeClass("focus");
				$("#tag").val("");	
			});
		}
	}
	</script> 
</body>
</html>